<template>
  <div class="headerContent">
    <div
      class="headerwidth"
      :style="
        screenWidth > 1400 ? 'width:1400px;;' : 'width:1200px;min-width:1200px;'
      "
    >
      <div class="navLogo">
        <!-- $router.push('/homework') -->
        <span class="logo" @click="logoBtn"
          ><img src="../../assets/image/school/logo.png" alt="百师云"
        /></span>
      </div>
      <div class="headerPeople">
        <div
          style="
            display: flex;
            align-items: center;
            margin-right: 6px;
            height: 100%;
          "
        >
          <div class="search_info">
            <template v-for="item in headList">
              <div
                v-if="item.children.length > 0"
                :key="item.order"
                style="margin-left: 46px"
                class="search_info_icon with-divider hover"
                :class="getMenuItemIsActive(item) ? 'search_info_iconArt' : ''"
              >
                <p style="margin-left: 7px">
                  作业<i
                    class="el-icon-arrow-down"
                    style="margin-left: 3px; font-size: 12px"
                  ></i>
                </p>
                <div class="secondNav-menu">
                  <span
                    v-for="(child, i) in item.children"
                    :key="i"
                    :class="{ active: getMenuItemIsActive(child) }"
                    @click="skip(child.sysId, child.domain)"
                    >{{ child.sysName }}</span
                  >
                </div>
              </div>

              <div
                v-else
                :key="item.order"
                class="search_info_icon with-divider"
                :class="getMenuItemIsActive(item) ? 'search_info_iconArt' : ''"
                @click="skip(item.sysId, item.domain)"
              >
                <p>{{ item.sysName }}</p>
              </div>
            </template>
          </div>
          <div>
            <span v-if="countToken == {}" @click="login">登录</span>
            <div
              v-else
              class="userInfo"
              style="display: flex; align-items: center"
            >
              <el-popover
                placement="bottom"
                width="150"
                trigger="manual"
                v-model="showQrPopover"
                popper-class="qr-popover"
              >
                <div
                  class="phoneimagecontent"
                  style="width: 150px; height: 150px"
                >
                  <img
                    src="../../assets/image/school/phoneimage.png"
                    alt="学生查分二维码"
                    style="width: 120px; height: 120px"
                  />
                  <b>学生端&教师端</b>
                </div>
                <!-- 触发二维码 -->
                <div
                  slot="reference"
                  style="
                    cursor: pointer;
                    position: relative;
                    z-index: 3000;
                    margin-right: 5px;
                  "
                  @mouseenter="showQrPopover = true"
                  @mouseleave="showQrPopover = false"
                  @click="showQrPopover = !showQrPopover"
                >
                  <div class="qrCodeForCheckingScores">
                    <img
                      src="../../assets/image/QrCode.png"
                      style="width: 13px; height: 13px"
                      alt="二维码"
                    />
                  </div>
                </div>
              </el-popover>
              <el-menu class="el-menu-demo" mode="horizontal">
                <el-submenu index="2">
                  <template slot="title">
                    <div>
                      <span
                        style="
                          display: inline-flex;
                          align-items: center;
                          margin-left: 2px;
                        "
                        ><b class="headertitle">{{
                          countToken.name ? countToken.name.slice(-1) : "&nbsp;"
                        }}</b
                        ><span style="color: rgb(91, 99, 113)">我的</span></span
                      >
                    </div>
                  </template>
                  <div>
                    <el-submenu index="2-4">
                      <template slot="title">
                        <div>
                          <i
                            class="el-icon-user"
                            style="margin-right: 5px; font-size: 14px"
                          ></i
                          ><span class="role-label">教师角色</span>
                        </div>
                      </template>
                      <div>
                        <el-menu-item
                          v-for="(item, index) in rolelist"
                          :key="item.leaderRoleType"
                          :index="'2 - 4 -' + index"
                          style="min-width: 125px"
                          :class="{
                            'active-role':
                              selectedRoleType === item.leaderRoleType,
                          }"
                          @click="selectRole(item.leaderRoleType)"
                        >
                          <span>
                            {{
                              item.leaderRoleType == 1001
                                ? "校长"
                                : item.leaderRoleType == 1002
                                ? "副校长"
                                : item.leaderRoleType == 1003
                                ? "教导主任"
                                : item.leaderRoleType == 2001
                                ? "班主任"
                                : item.leaderRoleType == 2002
                                ? "学科组长"
                                : "学科教师"
                            }}
                          </span>
                        </el-menu-item>
                      </div>
                      <!-- <el-menu-item index="2-4-2">选项2</el-menu-item>
                  <el-menu-item index="2-4-3">选项3</el-menu-item> -->
                    </el-submenu>
                    <el-menu-item index="2-2">
                      <div @click="passwordBtn">
                        <i
                          class="el-icon-key"
                          style="margin-right: 5px; font-size: 14px"
                        ></i>
                        <span class="role-label" style="margin-left: -5px"
                          >修改密码</span
                        >
                      </div>
                    </el-menu-item>
                    <el-menu-item index="2-2" @click="quite">
                      <i
                        class="el-icon-switch-button"
                        style="margin-right: 5px; font-size: 14px"
                      ></i>
                      <span class="role-label" style="margin-left: -5px"
                        >退出</span
                      >
                    </el-menu-item>
                  </div>
                </el-submenu>
              </el-menu>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { decrypt } from "../../utils/cryptojs";
import { get, post, del, dele } from "../../request/api.js";
import { mapGetters } from "vuex";

import Cookies from "js-cookie";

export default {
  data() {
    return {
      countToken: {},
      rolelist: [],
      roleId: 0,
      systemStatus: "",
      sourceAll: ["133"],
      source: "",
      currentMenu: "", // 当前激活的菜单
      selectedHomeworkSubItem: null, // 当前选择的作业子菜单项
      selectedRoleType: null, // 当前选择的角色类型
      homeworkMenuVisible: false, // 作业菜单的显示状态
      showQrPopover: false,
      // myMenuVisible: false,        // 控制“我的”菜单展开
      // roleMenuVisible: false,    //控制“教师角色”菜单展开

      headList: [],
    };
  },
  created() {
    get("/system/getSysInfoByCurr").then((res) => {
      this.headList = res.sysInfo;
    });

    setTimeout(() => {
      const alaynisData = decrypt(localStorage.getItem("accessToken"));
      this.countToken = JSON.parse(alaynisData);
      console.info("this.countToken", this.countToken);
      this.role();
    }, 1000);
    const path = (this.$route && this.$route.path) || window.location.pathname;

    if (path.includes("/homework")) {
      this.selectedHomeworkSubItem = 3;
    } else if (path.includes("/gradescoreindex")) {
      this.selectedHomeworkSubItem = 6;
    } else if (path.includes("/studentinfo")) {
      this.selectedHomeworkSubItem = 7;
    }

    const savedRole = localStorage.getItem("selectedRoleType");
    if (savedRole) {
      this.selectedRoleType = parseInt(savedRole);
    }

    const sysIds = Cookies.get("Sys-Ids");
    if (sysIds) {
      this.source = sysIds;
      localStorage.setItem("source", sysIds); // 缓存一份
    } else {
      // 如果当前页面 URL 没有 sysIds，但 localStorage 里有，就用缓存
      this.source = localStorage.getItem("source") || "";
    }
  },
  mounted() {},
  computed: {
    ...mapGetters(["getScreenWidth"]),
    screenWidth() {
      return this.getScreenWidth;
    },
  },
  methods: {
    passwordBtn() {
      window.location.href = `${this.$linkUrl}/website?type=1&isPassword=true`;
      // window.location.href = 'http://localhost:82/website?type=1&isPassword=true'
    },
    logoBtn() {
      window.location.href = `${this.$linkUrl}/website?type=1`;
    },
    // 获取所有的教师角色
    role() {
      get("/teacher/teacherrole").then((res) => {
        if (res.code == 200) {
          this.rolelist = res.data.filter(
            (item) => item !== null && item !== undefined
          );
          let rol = this.rolelist.filter((item) => item.isSelect == true);
          this.roleId = rol && rol.length > 0 ? rol[0].leaderRoleType : 0; // 添加可选链操作符
          let defaultRoleId = this.roleId;
          if (defaultRoleId !== null) {
            this.selectRoleInitial(defaultRoleId);
          } else {
            console.warn("没有可选的教师角色");
          }
        } else {
          this.$message.error(res.message);
        }
      });
    },
    selectRoleInitial(id) {
      this.selectedRoleType = id; // 设置当前选中角色，控制高亮样式
    },
    selectRole(id) {
      localStorage.setItem("selectedRoleType", id);
      this.selectedRoleType = id; // 设置当前选中角色，控制高亮样式
      this.roleclick(id);
    },
    roleclick(id) {
      // 获取当前路由信息
      this.roleId = id;
      let obj = {
        leaderRoleType: id,
      };
      get("/teacher/updaterole", obj).then((res) => {
        //console.info(res)
        if (res.code == 200) {
          const currentRoute = this.$route;

          // 定义需要跳转的路由白名单
          const redirectRoutes = [
            "Homework",
            "Gradescoreindex", // 新增成绩管理路由
            "Academiclevelsetting", // 新增
            "Scorerangesetting",
            "Studentinfo",
            "Teacherinfo",
            "Grademanagement",
            "Classmanagement",
            "Subjectmanagement",
            "Subjectselectionmanagement",
            "Topicmanagement",
            "Taskset", // 新增
          ];
          // //console.info(redirectRoutes.includes(currentRoute.name))
          // return false
          if (redirectRoutes.includes(currentRoute.name)) {
            window.location.reload();
          } else {
            this.$router.push("/homework");
          }
        }
      });
    },
    isActive(...routes) {
      // 如果传入的是一个路径数组，检查当前路径是否在数组中
      if (Array.isArray(routes[0])) {
        return routes[0].some((route) => this.$route.path.startsWith(route));
      }
      // 如果传入的是单个路径，直接检查是否匹配
      return routes.some((route) => this.$route.path.startsWith(route));
    },
    login() {
      // this.$router.push('/login')
      window.location.href = this.$loginUrl + "?type=133";
    },
    // quite() {
    //   get('/auth/loginout')
    //     .then(res => {
    //       localStorage.removeItem('accessToken')
    //       localStorage.removeItem('token')
    //       window.location.href = this.$loginUrl

    //     })
    // },

    quite() {
      get("/auth/loginout")
        .then((res) => {
          let TokenKey = "Admin-Token";
          if (process.env.NODE_ENV != "production") {
            TokenKey = "Test-Admin-Token";
          }

          Cookies.remove(TokenKey);
          localStorage.removeItem("accessToken");
          localStorage.removeItem("token");
          sessionStorage.clear();
          window.location.href = `${this.$linkUrl}/website?isToken=false`;
        })
        .catch((err) => {
          console.error("退出登录失败：", err);

          localStorage.removeItem("accessToken");
          localStorage.removeItem("token");
          sessionStorage.clear();

          window.location.href = `${this.$linkUrl}/website?isToken=false`;
        });
    },

    // 设置当前激活的菜单
    setCurrentMenu() {
      const currentPath = this.$route.path;
      if (
        currentPath.includes("/system") ||
        currentPath.includes("/monitor") ||
        currentPath === "/"
      ) {
        this.currentMenu = "home";
      } else if (currentPath.includes("/homeworkExam")) {
        this.currentMenu = "homework";
      } else if (
        currentPath.includes("/myTestQuestions") ||
        currentPath.includes("/questionBank") ||
        currentPath.includes("/cloudQuestionBank")
      ) {
        this.currentMenu = "question-bank";
      } else if (currentPath.includes("/myPaper")) {
        this.currentMenu = "my-paper";
      } else if (currentPath.includes("/schoolTestPaper")) {
        this.currentMenu = "paper-making";
      } else if (currentPath.includes("/answerSheet")) {
        this.currentMenu = "answer-sheet";
      } else if (currentPath.includes("/resource")) {
        this.currentMenu = "resource";
      }
    },
    // 获取菜单项的样式类
    getMenuItemIsActive(item) {
      if (item.domain.indexOf(window.location.pathname) != -1) {
        return true;
      } else {
        false;
      }
    },
    skip(sysId, domain) {
      let hasPermission = false;
      if (sysId == "-1" || this.source.includes(sysId)) {
        hasPermission = true;
      }

      if (hasPermission) {
        window.location.href = domain;
      } else {
        this.$alert("您没有访问该功能的权限", "拒绝访问");
      }
    },
    // handleClickOutside(e) {
    //   const menu = this.$el.querySelector('.secondNav-menu');
    //   if (menu && !menu.contains(e.target)) {
    //     this.homeworkMenuVisible = false;
    //   }
    // }
  },
};
</script>

<style scoped>
.headerwidth {
  width: 1440px;
  margin: 0 auto;
  height: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gobackhome {
  height: 52px;

  font-size: 14px;
  color: #557292;
  line-height: 52px;
  padding: 0 14px;
  cursor: pointer;
}

.gobackhome:hover {
  background: Rgb(247, 249, 255);
}

.gobackhome i {
  font-style: normal;
}

.rolelink {
  font-size: 14px;
  height: 45px;
  position: relative;
}

.rolelink b {
  display: block;
  height: 36px;
  border-radius: 100px;
  border: 2px solid #d8e4f0;
  line-height: 36px;
  color: #557292;
  padding: 0 10px;
  margin-left: 15px;
  cursor: pointer;
  margin-top: 3px;
}

.rolelink i {
  display: inline-block;
  padding-right: 4px;
}

.logo {
  cursor: pointer;
}

.navLogo {
  display: flex;
  justify-content: left;
  align-items: center;
}

.navLogo img {
  width: 110px;
  height: 24px;
}

.navLogo div {
  padding-left: 20px;
  display: flex;
  align-items: center;
}

.navLogo div a {
  display: block;
  color: #557292;
  font-size: 16px;
  width: 130px;
  text-align: center;
  position: relative;
  line-height: 52px;
  font-weight: bold;
}

.navLogo div a::before {
  content: "";
  width: 1px;
  height: 8px;
  background: #dee1e7;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.navLogo div a:last-child::before {
  content: "";
  width: 1px;
  height: 8px;
  background: #fff;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.navLogo div a:hover,
.navLogo div a.hover {
  color: #295cff;
}

.navLogo div a:hover::after,
.navLogo div a.hover::after {
  content: "";
  width: 24px;
  height: 4px;
  background: #295cff;
  border-radius: 2px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
}

/* .headerContent ul li img{
	}
	.headerContent ul li:last-child img{
		width:100%;
		height:auto;
		border-radius:200px;
	} */

.userInfo {
  align-items: center;
  font-size: 16px;
  color: #5677fb;
  height: 52px;
  width: 100px;
  margin-left: 36px;
  margin-top: 2px;
  clip-path: inset(0px 0px 2px 0px);
}

.headerboxImage {
  border-radius: 100px;
}

.role-label {
  color: #606266;
  font-size: 14px;
  line-height: 1.4;
  text-align: justify;
  word-break: break-all;
}

::v-deep(.el-submenu__icon-arrow) {
  top: 48%;
}

.el-menu-item.active-role {
  background-color: rgba(41, 92, 255, 0.08) !important;
  color: #295cff !important;
  border-radius: 4px;
}

.el-menu-item.active-role span {
  color: #295cff !important;
}

.headerContent {
  box-sizing: border-box;
  min-width: 1200px;
  background: #ffffff;
  box-shadow: 0px 4px 16px 0px rgba(85, 114, 146, 0.1);
  display: flex;
  justify-content: space-between;
  padding: 0 40px;
  align-items: center;
}

/* .headerContent ul li {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 2px solid #D8E4F0;
  border-radius: 100px;
  cursor: pointer;
  margin-left: 14px;
} */

.headercontent {
  box-sizing: border-box;
  position: absolute;
  left: 32%;
  top: 52px;
  width: 160px;
  text-align: left;
  border-radius: 6px;
  z-index: 15;
  display: none;
  transform: translateX(-50%);
  background: rgb(253, 253, 254);
  box-shadow: 0 4px 16px 0 rgba(85, 114, 146, 0.3);
  border-radius: 10px;
}

.headercontent img {
  display: block;
  margin: 0 auto 10px;
}

.jiantou {
  display: inline-block;
  margin-left: 8px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #5677fb;
  /* 蓝色三角箭头 */
}

.userInfo i {
  font-style: normal;
  cursor: pointer;
  color: rgb(236, 85, 90);
}

.userInfo:hover .jiantou {
  transform: rotate(180deg);
}

.userInfo:hover .headercontent {
  display: block;
}

.rolelink:hover .roleboxchildren {
  display: block;
}

.roleboxchildren {
  box-sizing: border-box;
  position: absolute;
  left: 32%;
  top: 46px;
  width: 140px;
  text-align: left;
  border-radius: 6px;
  z-index: 15;
  display: none;
  transform: translateX(-50%);
  background: rgb(253, 253, 254);
  box-shadow: 0 4px 16px 0 rgba(85, 114, 146, 0.3);
  border-radius: 10px;
}

.roleboxchildren img {
  display: block;
  margin: 0 auto 10px;
}

.roleboxchildren span {
  display: block;
  line-height: 36px;
  color: #333;
  cursor: pointer;
  padding: 0px 20px;
}

.roleboxchildren span:hover,
.roleboxchildren span.hover {
  background: rgb(244, 247, 253);
  color: #295cff;
}

.roleboxchildren span:first-child:hover,
.roleboxchildren span:first-child.hover {
  border-radius: 6px 6px 0 0;
}

.roleboxchildren span:last-child:hover,
.roleboxchildren span:last-child.hover {
  border-radius: 0px 0px 6px 6px;
}

.roleboxchildren span.tuichu {
  color: rgb(236, 85, 90);
}

.search_info {
  height: 52px;
  display: flex;
  align-items: center;
  position: relative;
}

.search_info_icon {
  display: flex;
  align-items: center;
  margin-left: 47px;
  cursor: pointer;
  position: relative;
  line-height: 52px;
}

.search_info_icon p {
  height: 52px;
  font-weight: 400;
  margin-left: 6px;
  font-size: 14px;
  color: #2a303b;
  line-height: 52px;
}

.search_info_icon:hover p,
.search_info_icon.hover p {
  color: #295cff;
}

/* 选中状态样式 */
.search_info_active p {
  color: #295cff !important;
  font-weight: 500;
}

/* 选中状态下划线 */
.search_info_active::before {
  content: "";
  position: absolute;
  bottom: 26px;
  left: 19px;
  transform: translateX(-50%);
  width: 12px;
  height: 4px;
  background-color: #295cff;
  border-radius: 1px;
}

.search_info_iconArt p {
  color: #295cff;
}

.imgGrayedOut {
  filter: grayscale(100%);
  /* 完全置灰 */
  -webkit-filter: grayscale(100%);
  /* 兼容Chrome/Safari等WebKit内核浏览器 */
  cursor: not-allowed;
}

.with-divider {
  position: relative;
}

.with-divider::after {
  content: "";
  position: absolute;
  right: -27px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 9px;
  background-color: #ccc;
}

.customPopper {
  min-width: 150px !important;
}

.search_info div:last-child::after {
  content: "";
  position: absolute;
  right: -27px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 9px;
  background-color: #fff;
}

.search_info div p {
  display: flex;
  align-items: center;
}

.search_info div p img {
  width: 12px;
  height: 12px;
  margin-left: 5px;
}

/* .secondNav-menu {
  position: absolute;
  left: 50%;
  top: 52px;
  width: 100px;
  height: 0;
  background: #fff;
  border-radius: 3px;
  z-index: 100;
  transform: translateX(-50%);
  box-shadow: 0px 0px 16px rgba(85, 114, 146, 0.1);
  padding: 4px 0;

}

.secondNav-menu span {
  display: block;
  font-size: 14px;
  line-height: 30px;
  text-align: center;
  color: #2A303B
} */
.secondNav-menu {
  position: absolute;
  left: 50%;
  top: 52px;
  width: 100px;
  height: 0;
  background: #fff;
  border-radius: 3px;
  z-index: 100;
  transform: translateX(-50%);
  transition: all 0.3s ease-in-out;
  opacity: 0;
  box-shadow: 0px 0px 16px rgba(85, 114, 146, 0.1);
  padding: 4px 0;
}

.secondNav-menu span {
  display: block;
  font-size: 14px;
  line-height: 30px;
  text-align: center;
  color: #2a303b;
}

.secondNav-menu {
  position: absolute;
  left: 50%;
  top: 52px;
  width: 100px;
  height: 0;
  background: #fff;
  border-radius: 3px;
  z-index: 100;
  transform: translateX(-50%);
  transition: all 0.3s ease-in-out;
  opacity: 0;
  box-shadow: 0px 0px 16px rgba(85, 114, 146, 0.1);
  padding: 4px 0;
}

.secondNav-menu span {
  display: block;
  font-size: 14px;
  line-height: 30px;
  text-align: center;
  color: #2a303b;
}

.secondNav-menu span:first-child {
  border-radius: 3px 3px 0 0;
}

.secondNav-menu span:last-child {
  border-radius: 0px 0px 3px 3px;
}

.secondNav-menu span:hover {
  background: #295cff0a;
  color: #295cff;
}

.secondNav-menu span.active {
  background: #295cff0a;
  color: #295cff;
}

.search_info div:hover .secondNav-menu {
  opacity: 1;
  height: 92px;
}

.headercontentinfo {
  cursor: pointer;
  font-size: 14px;
  color: rgb(91, 99, 113);
}

.headertitle {
  display: block;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  background-color: #295cff;
  color: #fff;
  font-weight: 600;
  margin-right: 6.5px;
  border-radius: 100px;
}

.headercontentseconed {
  box-sizing: border-box;
  position: absolute;
  left: 116px;
  top: 52px;
  width: 140px;
  text-align: left;
  border-radius: 6px;
  z-index: 15;
  /* display: none; */
  transform: translateX(-50%);
  background: rgb(253, 253, 254);
  box-shadow: 0 4px 16px 0 rgba(85, 114, 146, 0.3);
  border-radius: 10px;
}

.qrCodeForCheckingScores {
  width: 20px;
  height: 20px;
  border: 2px solid #d8e4f0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.userInfo .headercontentseconed span {
  display: block;
}

.userInfo .headercontentseconed em {
  display: block;
}

.userInfo:hover .headercontentseconed {
  display: block;
}

>>> .el-menu--horizontal > .el-submenu .el-submenu__icon-arrow {
  display: none;
}

>>> .el-menu.el-menu--horizontal {
  border: none;
}

>>> .el-menu--horizontal > .el-submenu .el-submenu__title {
  height: 52px;
  line-height: 52px;
  display: flex;
  align-items: center;
  margin-left: -10px;
}

>>> .el-menu--horizontal .el-menu-item.is-active {
  position: relative;
}

>>> .el-menu--horizontal .el-menu-item.is-active::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid #409eff;
}

>>> .el-menu--horizontal .el-menu .el-menu-item,
.el-menu--horizontal .el-menu .el-submenu__title {
  display: flex;
  color: rgb(91, 99, 113) !important;
  border-radius: 5px;
}

>>> .el-menu--horizontal > .el-submenu {
  width: 130px;
}

>>> .el-menu--popup {
  min-width: 125px !important;
  border-radius: 5px;
}

>>> .el-submenu__icon-arrow {
  right: 12px;
}
</style>
<style>
.el-menu--horizontal > .el-submenu {
  width: 130px;
}

.el-menu--popup {
  min-width: 125px !important;
  padding: 0;
  border-radius: 5px;
}

.el-submenu__icon-arrow {
  right: 12px;
}

.el-submenu__title:hover:hover,
.el-menu-item:hover {
  background: #ecf3fe;
  color: #295cff;
}

.el-submenu__title:hover:hover i,
.el-menu-item:hover i {
  color: #295cff;
}

.el-menu--horizontal .el-menu-item:not(.is-disabled):focus,
.el-menu--horizontal .el-menu-item:not(.is-disabled):hover {
  background: #ecf3fe;
  color: #295cff;
}

.el-menu--horizontal .el-menu-item:not(.is-disabled):focus,
.el-menu--horizontal .el-menu-item:not(.is-disabled):hover span {
  color: #295cff;
}

.phoneimagecontent {
  width: 100px;
  height: 120px;
  margin: 0 auto;
  /* 左右居中 */
  text-align: center;
}

.phoneimagecontent b {
  display: block;
  margin-top: 5px;
}
</style>